package com.softlook.mt.server.db.internal;

import java.lang.String;
import java.util.Hashtable;
import java.lang.Integer;
import jp.crossfire.framework.database.ICondition;
import jp.crossfire.framework.database.ConditionContainer;
import jp.crossfire.framework.database.Condition;

public class PlaceManagerInternal {
	public String getSql(Hashtable input, Integer limit, Integer offset) {
		return null;
	}
	protected ICondition getGetCondition(Hashtable input) {
		// Condition
		ICondition cnd0= new ConditionContainer("AND");
		ICondition cnd1= new Condition("placeid = '$placeid'");
		if(input.get("placeid") != null){
			((Condition)cnd1).getProperties().put("placeid", input.get("placeid"));
		}
		((ConditionContainer)cnd0).addChild(cnd1);
		ICondition cnd2= new Condition("lat <= '$lat'+delta");
		if(input.get("lat") != null){
			((Condition)cnd2).getProperties().put("lat", input.get("lat"));
		}
		((ConditionContainer)cnd0).addChild(cnd2);
		ICondition cnd3= new Condition("lat >= '$lat'-delta");
		if(input.get("lat") != null){
			((Condition)cnd3).getProperties().put("lat", input.get("lat"));
		}
		((ConditionContainer)cnd0).addChild(cnd3);
		ICondition cnd4= new Condition("lon <= '$lon'+delta");
		if(input.get("lon") != null){
			((Condition)cnd4).getProperties().put("lon", input.get("lon"));
		}
		((ConditionContainer)cnd0).addChild(cnd4);
		ICondition cnd5= new Condition("lon >= '$lon'-delta");
		if(input.get("lon") != null){
			((Condition)cnd5).getProperties().put("lon", input.get("lon"));
		}
		((ConditionContainer)cnd0).addChild(cnd5);
		return cnd0;
	}
	protected ICondition getGetHavingCondition(Hashtable input) {
		// Condition
		return null;
	}
	protected ICondition setGetCondition(Hashtable input) {
		// Condition
		ICondition cnd0= new ConditionContainer("AND");
		ICondition cnd1= new Condition("placeid = '$placeid'");
		if(input.get("placeid") != null){
			((Condition)cnd1).getProperties().put("placeid", input.get("placeid"));
		}
		((ConditionContainer)cnd0).addChild(cnd1);
		return cnd0;
	}
	protected ICondition delGetCondition(Hashtable input) {
		// Condition
		ICondition cnd0= new ConditionContainer("AND");
		ICondition cnd1= new Condition("placeid = '$placeid'");
		if(input.get("placeid") != null){
			((Condition)cnd1).getProperties().put("placeid", input.get("placeid"));
		}
		((ConditionContainer)cnd0).addChild(cnd1);
		return cnd0;
	}
}
